import request from '@/utils/http'
import { PaginationResult, BaseResult } from '@/types/axios'
import { TouristType } from './model/touristModel'

// 游客管理
export class TouristService {
  // 获取游客列表
  static getTouristList(params: any) {
    return request.get<PaginationResult<TouristType[]>>({
      url: `/api/tourists`,
      params
    })
  }

  // 获取游客详情
  static getTouristDetail(id: number) {
    return request.get<BaseResult<TouristType>>({
      url: `/api/tourists/${id}`
    })
  }

  // 导出游客列表
  static exportTouristList(params: any) {
    return request.get<Blob>({
      url: `/api/tourists/export`,
      params,
      responseType: 'blob'
    })
  }

  // 获取游客来源渠道统计
  static getTouristSourceStats() {
    return request.get<BaseResult<any>>({
      url: `/api/tourists/sourceStats`
    })
  }
} 